
extends Node2D

# member variables here, example:
# var a=2
# var b="textvar"

func _ready():
	var screen=get_viewport_rect().size
	var pos=Vector2(screen.width/2,screen.height/2)
	set_pos(pos)




func _on_restart_pressed():
	var root=get_tree().get_current_scene()
	root.time=0
	root.score=0
	root.get_node("enemyEmitter").start()
	root.get_node('score').set_text("0")
	root.get_node("hero_life").set_text("III")
	root.get_node("bg").speed=3
	queue_free()
	var hero=preload("res://hero/hero.scn").instance()
	root.add_child(hero)
	pass # replace with function body
